package com.example.demo.producer.service.impl;

import com.example.demo.producer.service.ServerFingerService;
import org.springframework.stereotype.Service;

import java.util.UUID;

/**
 * 获取随机数用于rabbitmq
 * Created by l.wang on 2018/3/28.
 */
@Service
public class ServerFingerServiceImpl implements ServerFingerService {
    private final String serverFinger;

    public ServerFingerServiceImpl() {
        this.serverFinger = UUID.randomUUID().toString();
    }

    @Override
    public String getServerFinger() {
        return serverFinger;
    }
}
